package io.renren.modules.oatools.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.oatools.dao.DataSourceDao;
import io.renren.modules.oatools.dto.DataSourceDTO;
import io.renren.modules.oatools.entity.DataSourceEntity;
import io.renren.modules.oatools.service.DataSourceService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 *
 * @author xhtang 173101649@qq.com
 * @since 1.0.0 2025-08-25
 */
@Service
public class DataSourceServiceImpl extends CrudServiceImpl<DataSourceDao, DataSourceEntity, DataSourceDTO> implements DataSourceService {

    @Override
    public QueryWrapper<DataSourceEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<DataSourceEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}